<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      * {
        margin: 0;
      }
      .main {
        width: 500px;
        height: 500px;
        background-color: aqua;
        display: grid;
        /* 设置多少列以及列的宽度 */
        grid-template-columns: 100px 100px 100px;
        /* 设置多少行以及行的高度 */
        grid-template-rows: 100px 100px 100px;
        /* 当内容的大小小于容器的大小时这才会生效 */
        /* justify-items: end;
        align-items: end; */
        /* place-items: start end; */
        /* 当容器有剩余空间的时候，生效，控制的是整体行列 */
        /* justify-content: center;
        align-content: space-between; */
        place-content: center space-between;
      }
      .main div {
        /* width: 50px;
        height: 50px; */
        border: 1px solid black;
        box-sizing: border-box;
      }
    </style>
  </head>
  <body>
    <div class="main">
      <div>1</div>
      <div>2</div>
      <div>3</div>
      <div>4</div>
      <div>5</div>
      <div>6</div>
      <div>7</div>
      <div>8</div>
      <div>9</div>
    </div>
  </body>
</html>
